package com.itheima.day04.objects;

import cn.hutool.core.util.ObjectUtil;
import com.itheima.day03.ZuoYe.ZuoYe3.Car;

import java.util.Objects;

public class objectstest {
    public static void main(String[] args) {
        Car car = new Car("w",0);
        Car car2 = new Car("w",0);
        System.out.println(car);
        System.out.println(car2);
        if(Objects.equals(car,car2)){
            System.out.println("相同");
        }else{
            System.out.println("不相等");
        }
        if(ObjectUtil.equals(car,car2)){
            System.out.println("相同");
        }else{
            System.out.println("不相等");
        }
    }
}
